<template>
  <div class="real-name">
    <div class="left" v-if="userInfo.type == 'personal'">
      <div class="item">审核状态：{{userInfo.statusValue}}</div>
      <div class="item">实名认证类型：个人</div>
      <div class="item">真实姓名：{{userInfo.realname}}</div>
      <div class="item">身份证号码：{{userInfo.idCardNumber}}</div>
    </div>
    <div class="left" v-else-if="userInfo.type == 'enterprise'">
      <div class="item">审核状态：{{userInfo.statusValue}}</div>
      <div class="item">实名认证类型：企业</div>
      <div class="item">注册公司：{{userInfo.companyName}}</div>
      <div class="item">营业执照编号：{{userInfo.businessLicenseNumber}}</div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'RealName',
  props: {
    userInfo: {
      type: Object,
      default() {
        return {}
      },
    },
  },
  data() {
    return {
      // loading: false,
      // value: '',
      // options: [],
      status:'',
      type:'',
      realname:'',
      idCardNumber:'',
      companyName:'',
      businessLicenseNumber:'',
    }
  },
  created(){
    // let {status,type,realname,idCardNumber,companyName,businessLicenseNumber} = JSON.parse(sessionStorage.getItem('userInfo'))
    // this.status = status
    // this.status = status
    // this.type = type
    // this.realname = realname
    // this.idCardNumber = idCardNumber
    // this.companyName = companyName
    // this.businessLicenseNumber = businessLicenseNumber
    console.log(this.userInfo)
    if(this.userInfo.status == 'passed'){
      this.userInfo.statusValue = '通过'
    }else if(this.userInfo.status == 'passed'){
      this.userInfo.statusValue = '拒绝'
    }else if(this.userInfo.status == 'pending'){
      this.userInfo.statusValue = '审核中'
    }
  },
  methods: {

  }
}
</script>

<style lang="less" scoped>

.real-name{
  width:100%;
  display: flex;

  .left{
    flex:1;
    padding:50px;
  }

  .item{
    margin-bottom: 30px;
    font-weight: bold;
    font-size: 15px;
  }
}

</style>
